<?php
/**
 * “案例”侧边栏
 */
class SidebarCases extends CWidget {

    public $title = 'Cases';
    public $node = null;
    public $limit = 12;
    
    public function run() {
        $models = UserCase::model()->findHot($this->node, $this->limit);
        
        $this->render('SidebarCases', array(
            'title' => $this->title,
            'models' => $models,
        ));
    }
}